package com.nekonomics
package api.dto.response

import com.nekonomics.domain.entity.Spu
import zio.json.*

case class SpuInfoDto(
  id: Long,
  title: String,
  description: Option[String],
) derives JsonEncoder 

object SpuInfoDto {
  def of(spu: Spu): SpuInfoDto = SpuInfoDto(
    id = spu.id,
    title = spu.name,
    description = spu.description,
  )
}
